// main.cpp
#include <Arduino.h>
#include "ESP32PeripheralManager.h"

ESP32PeripheralManager peripheralManager;

void setup()
{
    Serial.begin(115200);
    delay(1000); // 等待，确保串口稳定
    
    DEBUG_PRINTLN("[System] Starting ESP32 Peripheral Manager...");

    // 完全禁用流程控制
    if (!peripheralManager.begin())
    {
        DEBUG_PRINTLN("[error] Failed to initialize peripheral manager!");
        while (1)
        {
            delay(1000);
        }
    }

    DEBUG_PRINTLN("[system] ESP32 Peripheral Manager Ready!");
}

void loop()
{
    peripheralManager.update();
    delay(10);
}